package com.example.controller;

import com.example.service.ProductionRecordService;
import lombok.RequiredArgsConstructor;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/api/productionRecord")
@RequiredArgsConstructor
public class ProductionRecordController {
    private static final Logger log = LoggerFactory.getLogger(ProductionRecordController.class);
    private final ProductionRecordService productionRecordService;

    @GetMapping
    public void ProductionDetailImport() {
        log.info("获取德高系统数据");
        productionRecordService.ProductionDetailImport();
    }

    @PostMapping
    public void demo() {
        log.info("批量保存数据");
        productionRecordService.demo();
    }
}
